<?php
require_once('Configuracion.inc.php');
include(BASE_FRAMEWORK.'/Login.class.php');

$login = new Login();
$login->Get_Session();

  
$section = $_REQUEST['section'];

?>
<html>
<head>
<title>Bersuit - Popup</title>
<script language="Javascript">
	var sizeSelected = false;
	function getFlash()
    {
		var foto = document.getElementById('foto');

        if (foto.value.toLowerCase().indexOf('.swf') != '-1' && !sizeSelected)
        {
			var size = document.getElementById('size');
        	size.style.display = 'block';
        	sizeSelected = true;
            alert('Seleccione las dimensiones del Popup Flash');
        	document.getElementById('ancho').focus();
            return false;
        }
        return true;
    }
</script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="4">
<form name="alta_foto" method="post" action="add_popup2.php" enctype="multipart/form-data" onsubmit="return getFlash();">
<input type="hidden" name="section" value="<?=$section?>">
	<tr>
		<td class="txt"><b>Popup</b>:</td>
		<td>
        	<input type="file" name="foto" id="foto" class="txt">
            <div id="size" style="display: none">
            	<div style="font-weight: bold; width: 20px; display: inline;">Ancho</div> <input type="text" name="ancho" id="ancho" size="8"> px<br />
                <div style="font-weight: bold; width: 20px; display: inline;">Alto</div> <input type="text" name="alto"  id="alto"  size="8"> px
            </div>
        </td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" name="enviar" value="Enviar" class="formbox"></td>
	</tr>
</form>
</table>

</body>
</html>